home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-09-11 | 846 b | 33 lines | [TEXT/GEOL] |
- Item 9938900 8-Sept-89 18:06
-
- From: D0568 Poseidon Systems, N Menendez,PRT
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Pascal Code Generation help
-
- In a MacApp program, we were getting an overflow condition when
- the following line of code was executed in a method of an object:
-
- (1) Value := fIntegerField * kConstant; {bomba}
-
- *( Value: LONGINT, fIntegerField: INTEGER subrange, kConstant = 60)
-
- If we change the line to:
-
- (2) Value := LONGINT(fIntegerField * kConstant); {still bomba !}
-
- However, if we instead code it as:
-
- (3) Value := LONGINT(fIntegerField) * LONGINT(kConstant); {it works !!!}
-
- Shouldn't the compiler work with cases 1 and 2 ? (Especially with case 2)
-
- Thank you for any help you may provide,
-
- Norbert
- PSI
- D0568
-
-
-